Rainbow RPG Editor is a free-software editor for the MIT-licensed [RPG Maker MV CoreScript](https://github.com/rpgtkoolmv/corescript) engine. It is written in Object Pascal using Lazarus, and currently supports GNU/Linux and Windows.

**Currently it is incomplete. You cannot create a game with it (yet).**

The goal of Rainbow RPG Editor is to provide a cross-platform, open-source game constructor that will empower people to tell their stories. It is intended as a drop-in replacement for RPG Maker MV, but with better license, no cost, and support for languages overlooked by RMMV (notably Ukrainian).

Rainbow RPG Editor is double-licensed under either [The Hippocratic License 2.1](https://firstdonoharm.dev/version/2/1/license.html) (or newer) or [GNU AGPL 3](https://www.gnu.org/licenses/agpl-3.0.html) (or newer).

## Compiling

You need Lazarus IDE to build this project. The most basic way to get it is to use your package manager on Linux or download a package from <https://www.lazarus-ide.org> on Windows. These will normally install bare-bones versions that should be enough for Rainbow Editor.

Alternative options include <https://www.getlazarus.org/> (which provides precompiled binaries with customizations and cross-compilers) and FPCUPdeluxe (which will compile the required version from sources and allows for very detailed configuration; available from <https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/v2.2.0c>). 

### Compiling using graphical interface

- Download the project, extract it into its own directory.
- In the Lazarus IDE, choose Project > Open Project (Ctrl+F11), choose rainboweditor.lpi from the rainbow-editor folder.

If you haven't installed BGRABitmap before, you'll have to do it now:
- If you open rainboweditor.lpi without BGRABitmap library installed, you'll see an error message about BGRABitmapPack missing
- Download a BGRABitmap release from <https://github.com/bgrabitmap/bgrabitmap/releases>
- Unpack it somewhere
- Use Package > Open Package File (.lpk) to open bgrabitmappack.lpk, then use Use > Add to Project.

### Compiling from command-line

- Download a BGRABitmap release from <https://github.com/bgrabitmap/bgrabitmap/releases> and unpack it somewhere.

Add it to Lazarus like this:

        lazbuild --add-package-link /path-to-bgrabitmap/bgrabitmap/bgrabitmappack.lpk

Then, run the following (in the directory of the Rainbow Editor):

        lazbuild rainboweditor.lpr

## Running projects

To run a game, you would need nwjs. Place it in either of the folders:

* \<program folder>/nwjs
* \<program folder>/share/rainbow-editor/nwjs
* \<program folder>/share/nwjs
* \<parent folder>/nwjs
* \<parent folder>/share/rainbow-editor/nwjs
* \<parent folder>/share/nwjs
* /nwjs
* /share/rainbow-editor/nwjs
* /share/nwjs
